package com.sukaiyi.giteeideaplugin.misc;

import java.util.Objects;

/**
 * @author sukaiyi
 * @date 2020/07/09
 */
@FunctionalInterface
public interface TriConsumer<T, U, R> {

    void accept(T t, U u, R r);

    default TriConsumer<T, U, R> andThen(TriConsumer<? super T, ? super U, ? super R> after) {
        Objects.requireNonNull(after);

        return (a, b, c) -> {
            accept(a, b, c);
            after.accept(a, b, c);
        };
    }
}
